from django.db import models

# Create your models here.
class Teacher(models.Model):
    name=models.CharField(max_length=255,null=False)
    sex=models.CharField(max_length=255,null=False)
    dateofbirth=models.CharField(max_length=255,null=False)
    contactway=models.CharField(max_length=255,null=False)
    position=models.CharField(max_length=255,null=False)


class Student(models.Model):
    name = models.CharField(max_length=255, null=False)
    sex = models.CharField(max_length=255, null=False)
    dateofbirth = models.CharField(max_length=255, null=False)
    contactway = models.CharField(max_length=255, null=False)
    nowclass=models.CharField(max_length=255,null=False)
    teacher=models.ForeignKey(Teacher,on_delete=models.CASCADE)
